home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 090 / byt1186b.arc / RUNGKUT.LBR / EPSILON.FOR next >
Text File  |  1986-04-11  |  640b  |  23 lines

  1. $NOFLOATCALLS
  2. $NODEBUG
  3. $STORAGE:2
  4. c*********************************************************************
  5.  
  6.     subroutine caleps
  7.  
  8. c****    subroutine calculates the machine epsilon EPS using an
  9. c****    algorithim adapted from Forsythe et. al. "Computer Methods
  10. c****    for Mathematical Computations", Prentice-Hall,N.J. (1977).
  11. c****    The EPS calculated can differ from the true machine EPS by
  12. c****    at most a factor of 2.
  13.  
  14.     double precision eps
  15.     common /epsil/eps
  16.  
  17.     eps=1.d0
  18. 10    eps=.5d0*eps
  19.     if((eps+1.d0).GT.1.d0) goto 10
  20. c    write(*,*) 'Machine Epsilon used=',eps
  21.     return
  22.     end
  23.